import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/Home'
import Household from '@/pages/Household'
import Detail from '@/pages/Detail'
import Desc from '@/pages/Desc'
import Comment from '@/pages/Comment'
import Cart from '@/pages/Cart'
import Order from '@/pages/Order'
import MonthNanny from '@/pages/MonthNanny'
import MonthNannyDetail from '@/pages/MonthNannyDetail'
import Nurse from '@/pages/Nurse'
import About from '@/pages/About'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home',
      name: 'Home',
      component: Home
    },
    {
      path: '/home',
      name: 'Home',
      component: Home
    },
    {
      path: '/household',
      name: 'Household',
      component: Household,
    },
    {
      path: '/household/detail',
      name: 'Detail',
      component: Detail,
      children: [
        {
          path: 'desc',
          name: 'Desc',
          component: Desc,
        },
        {
          path: 'comment',
          name: 'Comment',
          component: Comment,
        },
      ]
    },
    {
      path: '/cart',
      name: 'Cart',
      component: Cart,
    },
    {
      path: '/order',
      name: 'Order',
      component: Order,
    },
    {
      path: '/monthNanny',
      name: 'MonthNanny',
      component: MonthNanny
    },
    {
      path: '/monthNanny/monthNannyDetail',
      name: 'MonthNannyDetail',
      component: MonthNannyDetail,
    },
    {
      path: '/nurse',
      name: 'Nurse',
      component: Nurse,
    },
    {
      path: '/about',
      name: 'About',
      component: About,
    },
  ]
})
